﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Manhua2.Pages"
    xmlns:controls="using:WinRTXamlToolkit.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Interactivity="using:WinRTXamlToolkit.Interactivity" xmlns:Behaviors="using:WinRTXamlToolkit.Controls.Behaviors"
    x:Class="Manhua2.Pages.SettingPage"
    mc:Ignorable="d">

    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="100" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal">
                <Button x:Name="btnBack" Margin="36,0, 0,26" Style="{StaticResource BackButtonStyle}" Click="btnBack_Click"/>
                <TextBlock Margin="20, 0, 0, -10" FontSize="36" VerticalAlignment="Center" Style="{StaticResource TitleTextStyle}">
            	<Run Text="设置"/>
                </TextBlock>
            </StackPanel>
            <Grid Margin="20,0,0,0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left">
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="txtCache" FontSize="30" VerticalAlignment="Center" Style="{StaticResource TitleTextStyle}" Text="在线阅读缓存  0.0MB" />
                        <Button x:Name="btnClear" Margin="20,0,0,0" Height="50" Width="100" Content="正在计算"/>
                    </StackPanel>
                    <ToggleSwitch x:Name="direction" 
                              OffContent="右方向翻页" 
                              OnContent="左方向翻页" 
                              FontSize="30"
                              IsOn="{Binding LeftToRight, Mode=TwoWay}"
                              Toggled="ToggleSwitch_Toggled"/>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock FontSize="30" 
                               Margin="0,20,0,0"
                               VerticalAlignment="Center" 
                               Style="{StaticResource TitleTextStyle}" 
                               Text="选择漫画源" />
                        <ComboBox x:Name="cboProvider"
                                  Margin="20,0,0,0"
                                  SelectionChanged="cboProvider_SelectionChanged">
                            <ComboBoxItem Content="{StaticResource acg178}" Tag="acg178"></ComboBoxItem>
                            <ComboBoxItem Content="{StaticResource bengou}" Tag="bengou"></ComboBoxItem>
                            <ComboBoxItem Content="{StaticResource 4399}" Tag="4399"></ComboBoxItem>
                            <ComboBoxItem Content="{StaticResource sfacg}" Tag="sfacg"></ComboBoxItem>
                        </ComboBox>
                    </StackPanel>
                    <TextBlock FontSize="30" 
                               Margin="0,20,0,0"
                               VerticalAlignment="Center" 
                               Style="{StaticResource TitleTextStyle}" 
                               Text="设置背景色" />
                    <Grid Margin="0, 10">
                        <controls:HueRingPicker
                            x:Name="hueRing"
                            VerticalAlignment="Stretch"
                            HorizontalAlignment="Stretch"
                            Height="400" Width="400" />
                        <controls:TrianglePicker
                	        x:Name="trianglePicker"
                	        Margin="0,130,0,0"
                	        Width="120"
                	        Height="120"
                	        VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" >
                        <controls:TrianglePicker.Foreground>
                            <ImageBrush x:Name="triangleBrush" />
                        </controls:TrianglePicker.Foreground>
                    </controls:TrianglePicker>
                    </Grid>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</Page>